/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ejb.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author tawfeeq
 */
@Entity
@Table(name = "pi_identification", catalog = "ehealth", schema = "")
@NamedQueries({
    @NamedQuery(name = "Identification.findAll", query = "SELECT i FROM Identification i"),
    @NamedQuery(name = "Identification.findByIdentification", query = "SELECT i FROM Identification i WHERE i.identification = :identification"),
    @NamedQuery(name = "Identification.findByIdentificationName", query = "SELECT i FROM Identification i WHERE i.identificationName = :identificationName")})
public class Identification implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "identification")
    private Integer identification;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "identification_name")
    private String identificationName;

    public Identification() {
    }

    public Identification(Integer identification) {
        this.identification = identification;
    }

    public Identification(Integer identification, String identificationName) {
        this.identification = identification;
        this.identificationName = identificationName;
    }

    public Integer getIdentification() {
        return identification;
    }

    public void setIdentification(Integer identification) {
        this.identification = identification;
    }

    public String getIdentificationName() {
        return identificationName;
    }

    public void setIdentificationName(String identificationName) {
        this.identificationName = identificationName;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (identification != null ? identification.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Identification)) {
            return false;
        }
        Identification other = (Identification) object;
        if ((this.identification == null && other.identification != null) || (this.identification != null && !this.identification.equals(other.identification))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ejb.entity.Identification[ identification=" + identification + " ]";
    }
    
}
